The present invention relates to a system and method for displaying three-dimensional images on a two-dimensional raster display screen using depth buffering and more particularly to a system and method for displaying three-dimensional images on a two-dimensional raster display screen by utilizing a serial access port of a two port dynamic random access memory device in depth buffering applications.
In systems providing three-dimensional representations of images on a two-dimensional display, it is generally necessary to eliminate hidden surfaces. Depth buffering is one common technique used to perform hidden surface removal of three-dimensional graphics primitives, and one such depth buffering system was described in U.S. Pat. No. 4,475,104 the disclosure of which is incorporated herein by reference.
In general, a depth buffer maintains a depth value for each pixel which may be displayed. Hidden surface removal is done by comparing the depth of each pixel being drawn with the depth of the pixel currently displayed at the location. If the new pixel is determined to be visible, then the pixel is written, and the depth value for that pixel in the depth buffer is updated.
In the system described in U.S. Pat. No. 4,475,104, a host processor supplies input information on the geometric elements (e.g. polygons), which make up the image to a local display processor which processes the input information and provides data concerning the location, color, intensity and depth of the points which make up the surfaces of the polygon. The depth data is stored in a depth buffer which is a part of the display processor, and the color and intensity data is also stored directly in a frame buffer or as color index data in the frame buffer which is used to address the desired color and intensity stored in a color look-up table.
This system was an improvement over known prior art systems insofar as in the prior art systems the host processor performs both the geometric transformation of the input data into an image to be displayed as well as hidden surface removal and shading. Once the host processor performed these two tasks in the prior art systems, the calculated information was then sent to the local display processor which caused the image to be displayed on a raster display screen on a line-by-line basis. A major disadvantage of this type of system was that the entire image had to be created and stored by the host processor before any data concerning the points defining the image could be supplied to the display processor. As a result, a user wishing to use information in a data base to display an image must wait for data defining the complete image to be duplicated in a non-displayable form at the host processor before it can be transferred to the display processor.
The system of U.S. Pat. No. 4,475,104 avoided these problems by requiring that the display processor process the intensity and color data as well as the depth data, leaving the host processor to perform only the geometry transformation functions. As a result, the overall image to be displayed is constructed incrementally and selected portions of the image can be displayed immediately at any location and in any order.
Referring to FIG. 1A, in performing the depth buffering operation, the local display processor performs the following steps:
1. Interpolate the pixel depth by adding the current pixel depth to the depth interpolate register.
2. Read the old pixel depth from the depth buffer.
3. Compare the old pixel depth with the current pixel depth.
4. Conditionally write the current pixel depth into the depth buffer if the current pixel is determined to be in front the old pixel depth.
As a result, the Read, Compare and Conditional Write steps require access to the I/0 part of the depth buffer for three separate and distinct clock cycles as shown in FIG. 1B. The processor performing the Compare operation is thus in use for no more than one third of the available processing time.
It is therefore a principal object of the present invention to provide an improved three dimensional display system utilizing a depth buffer that optimizes use of the local display processor.
Another object of the present invention is to provide an improved three dimensional display system utilizing a depth buffer that pipelines operations of the local display processor.